<ion-view class="cart" view-title="{{tabcartname}}">
	<!--一定要手动加导航栏-->
	<ion-nav-bar>
		<ion-nav-back-button>
		</ion-nav-back-button>
	</ion-nav-bar>
	<ion-content class="bg" ng-class="{'has-footer':datas.store}">
		<div class="list">
			<!--没有数据-->
			<li class="item noData" ng-if="firstHide&&!datas.store">
				<img src="./img/guilin/other/icon_noCar@2x.png" />
				<div class="tip">采购车空空如也！</div>
			</li>
			
			<li class="item" ng-class="{'mt10':!$first}" ng-repeat-start="store in datas.store" ng-init="storeIndex =$index">
				<div class="titleItem">
					<img src="{{store.choose?'./img/guilin/common/icon_check_o@2x.png':'./img/guilin/common/icon_uncheck_o@2x.png'}}" class="check" on-tap="store_select($event,store.id,store.choose, storeIndex)" />
					<img src="./img/guilin/common/icon_shop@2x.png" class="check" />
					<span on-tap="showStore(store.id,0)">{{store.name}}<img src="./img/guilin/common/icon_right@2x.png" class="jt" /></span>
					<span class="yh" ng-if="store.coupon" on-tap="openModal_coupon($event,$index)">领券</span>
				</div>
			</li>
			<!--主商品-->
			<li class="item" ng-repeat-start="products in store.products">
				<div class="row goodsItem">
					<!--选择单个商品-->
					<div class="iconCol">
						<img src="{{products.choose?'./img/guilin/common/icon_check_o@2x.png':'./img/guilin/common/icon_uncheck_o@2x.png'}}" on-tap="goods_select($event,products.type,products.ident_id,products.choose,storeIndex)"/>
					</div>
					<div class="goodsImgCol" ng-class="{'borderTopNot':$first}" on-tap="show_goods(products.goods_id,products.type)">
						<img src="{{products.image?products.image:noImg}}" class="goodsImg" />
					</div>
					<div class="col goodsCol" ng-class="{'borderTopNot':$first}">
						<div class="row padding-0" on-tap="show_goods(products.goods_id,products.type)">
							<div class="col-75 padding-0">
								<div class="goodsName ellipsis-2">{{products.goods_name}}</div>
								<div class="spec ellipsis-2">{{products.spec_info}}</div>
							</div>
							<div class="col-25 padding-0">
								<img src="./img/guilin/other/icon_del@2x.png" class="delIcon" on-tap="delete_goods($event,products.ident_id,products.type)"/>
							</div>
						</div>
						<div class="priceDiv">
							<span class="price">{{products.price|currency:'￥'}}</span>
							<!--<span class="orgPirce">{{products.mktprice|currency:'￥'}}</span>-->
							<div class="numDiv">
								<div class="add" on-tap="addAndReduceGoods($event, products.num,products.ident_id,products.type,products.buy_base,storeIndex,'','',false)">-</div>
								<input type="text" ng-model="products.num" ng-disabled="true"/>
								<div class="add" on-tap="addAndReduceGoods($event, products.num,products.ident_id,products.type,products.buy_base,storeIndex,'','',true)">+</div>
							</div>
						</div>
					</div>
				</div>
			</li>
			
			<!--配件-->
			<li class="item" ng-repeat="suit in products.suit" ng-repeat-end="products">
				<div class="row goodsItem">
					<div class="iconCol">
						&nbsp;
					</div>
					<div class="goodsImgCol" ng-class="{'borderTopNot':$first}" on-tap="show_goods(suit.goods_id,'goods')">
						<img src="{{suit.image?suit.image:noImg}}" class="suitImg" />
					</div>
					<div class="col goodsCol">
						<div class="row padding-0" on-tap="show_goods(suit.goods_id,'goods')">
							<div class="col-75 padding-0">
								<div class="goodsName ellipsis-2"><span style="color: rgb(254, 97, 25);">[配件]</span>{{suit.goods_name}}</div>
								<div class="spec ellipsis-2">{{suit.spec_info}}</div>
							</div>
							<div class="col-25 padding-0">
								<img src="./img/guilin/other/icon_del@2x.png" class="delIcon" on-tap="delete_goods($event,products.ident_id,'adjunct',products.group_id,suit.product_id)"/>
							</div>
						</div>
						<div class="priceDiv">
							<span class="price">{{suit.price|currency:'￥'}}</span>
							<!--<span class="orgPirce">{{suit.mktprice|currency:'￥'}}</span>-->
							<div class="numDiv">
								<div class="add" on-tap="addAndReduceGoods($event,suit.num,products.ident_id,'adjunct',products.buy_base,storeIndex,products.group_id,suit.product_id,false)">-</div>
								<input type="text" ng-model="suit.num" ng-disabled="true"/>
								<div class="add" on-tap="addAndReduceGoods($event,suit.num,products.ident_id,'adjunct',products.buy_base,storeIndex,products.group_id,suit.product_id,true)">+</div>
							</div>
						</div>
					</div>
				</div>
			</li>
			
			<!--优惠信息，最外层循环结束-->
			<li class="item" ng-repeat-end="" ng-if="store.discount">
				<div class="proItem">
					<div class="proDiv" ng-repeat="discount in store.discount" ng-class="{'mb0':$last}" on-tap="showStore(store.id,1)">
						<span class="cuxiao">促销</span>{{discount.name}}
						<div class="right-zhang" ng-if="$first">
							<span class="cd">凑单</span>
							<img src="./img/guilin/common/icon_right@2x.png" class="jt" />
						</div>
					</div>
				</div>
			</li>
			
			
			<!--猜你喜欢-->
			<li class="item likeTitle" ng-if="datas.like_list">
				<div class="row padding-0">
					<div class="col padding-0 text-right"><span class="line"></span></div>
					<div class="textCol">猜你喜欢</div>
					<div class="col padding-0 text-left"><span class="line"></span></div>
				</div>
			</li>
			<li class="item likeItem item-image">
				<div class="likeDiv" ng-repeat="like in datas.like_list" on-tap="show_goods(like.goods_id,'goods')">
					<img src="{{like.image.url}}" />
					<div class="textDiv">
						<div class="goodsName ellipsis-2">{{like.goods_name}}</div>
						<div class="price">{{like.price|currency:'￥'}}</div>
					</div>
				</div>
			</li>
		</div>
	</ion-content>

	<div class="subfooter" ng-if="datas.store">
		<img src="{{input.is_all?'./img/guilin/other/centerout_gx.png':'./img/guilin/other/centerout_no_gx.png'}}" on-tap="select_all()"/>
		全选
		<div class="jiesuan" on-tap="onshow_afsrue()">结算</div>
		<div class="total">{{datas.total_amount|currency:'￥'}}</div>
		<div class="right-zhang">合计：</div>
	</div>
</ion-view>